package team.first.movieapiv3.staff;

import com.fasterxml.jackson.annotation.JsonBackReference;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.neo4j.ogm.annotation.Id;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;

import java.util.List;


@Getter
@Setter
@ToString
@Accessors(chain = true)
@NodeEntity(label = "Staff")
public class StaffNode {

    @Id
    private Integer id;
    private String chineseName;
    private String englishName;
    private String gender;
    private String region;
    private String birthday;
    private String summary;
    private String avatarUrl;
    private String avatar;

    @Relationship(type = "ACTED")
    private List<Filmography> acted;

    // @JsonBackReference// 防递归调用
    @Relationship(type = "DIRECTED")
    private List<Filmography> directed;

}
